# usage: add-quotes-to-abbr.py input output

import sys, re

with open(sys.argv[1]) as input_file:
    with open(sys.argv[2], "w") as output_file:
        for line in input_file:
            output_file.write(re.sub("([А-Я]{2,}[^\ \n\.\,\:\;]*)", r'"\1"', line))
        